package com.example.shop.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.shop.bean.CollectBean;
import com.example.shop.bean.FollowBean;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface FollowMapper extends BaseMapper<FollowBean> {

    @Select("select * from tbl_follow where uid=#{uid} and sid=#{sid}")
    List<FollowBean> listByUidPid(@Param("uid")int uid, @Param("sid") int sid);

    @Select("delete from tbl_follow where uid=#{uid} and sid=#{sid}")
    void cancelFollowByUidPid(@Param("uid")int uid,@Param("sid") int sid);

    @Select("select * from view_follow where uid=#{uid}")
    List<FollowBean> followList(@Param("uid")int uid);

    @Select("select * from view2_follow ")
    List<FollowBean> followList2();
}
